package com.xxx.server.utils;

import com.xxx.server.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 *   操作员工具类
 * @Author zyh
 * @Date 2021/4/15 10:01
 * @Version 1.0
 **/
public class AdminUtils {

    /*
    * 获取当前登录操作员
    * */
    public static Admin getCurrentAdmin(){
        return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }

}
